gnttab: check handle early in gnttab_get_status_frames()
authorJan Beulich <jbeulich@suse.com>
Tue, 7 Sep 2021 07:36:20 +0000 (09:36 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 7 Sep 2021 07:36:20 +0000 (09:36 +0200)
commit0c229e6c9fb1fef776a423dfcbbbe6b67122d7a6
treec1d8b6faffe7d5cd4e6338eeadb7522fb96b56a8
parent5f864f43f6f57d17ae7c6e16f8ededbc501fb342
gnttab: check handle early in gnttab_get_status_frames()

Like done in gnttab_setup_table(), check the handle once early in the
function and use the lighter-weight (for PV) copying function in the
loop.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Julien Grall <jgrall@amazon.com>
xen/common/grant_table.c